Skip to content

Comments

#87: Making sure the post formatting will only be executed in valid contexts#98

Merged
dorian-krefft-dt merged 1 commit intomainfrom
bugfix/87
Jan 28, 2026
Merged

#87: Making sure the post formatting will only be executed in valid contexts#98
dorian-krefft-dt merged 1 commit intomainfrom
bugfix/87

Conversation

@dorian-krefft-dt
Copy link
Collaborator

@dorian-krefft-dt dorian-krefft-dt commented Jan 28, 2026

No description provided.

@dorian-krefft-dt dorian-krefft-dt self-assigned this Jan 28, 2026
Copilot AI review requested due to automatic review settings January 28, 2026 11:53
@dorian-krefft-dt dorian-krefft-dt changed the title #87: Making sure the post formatting will only be executed in valid c… #87: Making sure the post formatting will only be executed in valid contexts Jan 28, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a guard to ensure DQL post-formatting logic only executes in valid DQL file contexts, addressing issue #87.

Changes:

  • Added validation to check if the file type is DQL before processing
  • Refactored variable declarations in the processInjectedHosts method by moving service instances from parameters to local variables
  • Reorganized method call order for better logical flow

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

processInjectedHosts(hostFile, range, settings, documentManager, project, dqlSettings);

// Process only for DQL files or injected fragments
if (!hostFile.getFileType().equals(DQLFileType.INSTANCE)) {
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment on line 46 states 'Process only for DQL files or injected fragments', but the guard returns early for non-DQL files, which would also skip processing injected DQL fragments in other file types. If injected fragments should still be processed, the validation logic needs to be adjusted to allow processing when DQL is injected into other file types.

Copilot uses AI. Check for mistakes.
@dorian-krefft-dt dorian-krefft-dt merged commit 44b1953 into main Jan 28, 2026
7 checks passed
@github-actions
Copy link
Contributor

Qodana for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/[email protected]
        with:
          upload-result: true
Contact Qodana team

Contact us at [email protected]

@dorian-krefft-dt dorian-krefft-dt deleted the bugfix/87 branch January 29, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant